package com.sba.core.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.sba.core.domain.Region;

/**
 * 
 * @author feiliming
 *
 */
public interface RegionRepository extends BaseRepository<Region> {

	Page<Region> findByIsDelete(int isDelete, Pageable pageable);
	Page<Region> findByNameLikeAndIsDelete(String name, int isDelete, Pageable pageable);
	
	Page<Region> findByParentIdAndIsDelete(Long parentId, int isDelete, Pageable pageable);
	Page<Region> findByParentIdAndNameLikeAndIsDelete(Long parentId, String name, int isDelete, Pageable pageable);
	
	Page<Region> findByRegionTypeAndIsDelete(String regionType, int isDelete, Pageable pageable);
	Page<Region> findByRegionTypeAndNameLikeAndIsDelete(String regionType, String name, int isDelete, Pageable pageable);
	
}
